package com.hgkj.cloud.base.dao;

import com.hgkj.cloud.base.domain.TenantDeviceInfo;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

@Mapper
public interface TenantDeviceInfoMapper {
    int deleteByPrimaryKey(Long id);

    int insert(TenantDeviceInfo record);

    int insertSelective(TenantDeviceInfo record);

    TenantDeviceInfo selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(TenantDeviceInfo record);

    int updateByPrimaryKey(TenantDeviceInfo record);

    TenantDeviceInfo getDeviceInfoById(Long id);

    TenantDeviceInfo getDeviceInfoByVcode(String vcode);

    Map<String, Object> getDeviceInfoMapByVcode(String vcode);

    List<TenantDeviceInfo> listDeviceInfos(Map<String, Object> map);
    List<TenantDeviceInfo> listUserDeviceInfos(Map<String, Object> map);

    List<TenantDeviceInfo> listDeviceInfosGroupbyDev_id(Map<String, Object> map);

    List<TenantDeviceInfo> listDeviceInfosBackend(Long tenant_id);

    List<TenantDeviceInfo> listTenantDeviceInfos(Map<String, Object> map);

    int countTenantDeviceInfos(Map<String, Object> map);

    int updateDeviceInfo(TenantDeviceInfo info);

    int updateDeviceInfoOwner(Map<String, Object> map);

    int deleteDeviceInfo(Long id);

    List<Map<String, Object>> listAllDeviceData(Map<String, Object> map);

    List<Map<String, Object>> listAllTenantData(Map<String, Object> map);

    List<TenantDeviceInfo> queryDeviceInfos(Map<String, Object> map);

    int queryDeviceInfosCount(Map<String, Object> map);

    Map<String, Object> statDevState(Map<String, Object> map);

    List<Map<String, Object>> getDeviceListByDevVcode(String devVcode);

    Map<String, Object> getDevicesFlagMap(Map<String, Object> map);

    List<Map<String,Object>> getSubDeviceList(Map<String, Object> map);

    TenantDeviceInfo getLastGroupDeviceInfo(Map<String, Object> map);

    List<Map<String,Object>> getGroupOnlineDevice(Map<String, Object> map);

    List<Map<String,Object>> getNotGroupDeviceList(Map<String, Object> map);
}